upper = 0
lower = 0
num = 0

string = input("")
for item in string:
    if item.isupper():
        upper += 1
    elif item.islower():
        lower += 1
    elif item.isdigit():
        num += 1
print(upper)
print("")
print(lower)
print("")
print(num)
